
console.log( Date.now() );

// setInterval( codeString , delay  )
// let timer = setInterval( 'console.log( Date.now() )' , 1000 ); // node.js 不支持

let count = 1 ;

function showTime(){
    console.log( Date.now() );
    count++ ;
    if( count === 10 ) {
        clearInterval( timer );
    }
}

let timer = setInterval( showTime , 1000 );

/*
console.log( timer.constructor );
console.log( timer.constructor.prototype );

let names = Object.getOwnPropertyNames( timer );
let fn = function( e , i , a ){
    console.log( e );
}
names.forEach( fn );

let symbols = Object.getOwnPropertySymbols( timer );
symbols.forEach( fn );
*/